
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
}

/* 导航栏 */
.navbar {
    width: 100%;
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .nav-left {
    display: flex;
    gap: 20px;
}

.navbar .nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.navbar a {
    color: black;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 15px;
}

.navbar a:hover {
    background: #f5f5f5;
    color: #333;
}

/* 主容器 */
.container {
    width: 100%;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* 左右分栏区域 */
.part1 {
    width: 100%;
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧题目描述 */
.left_desc {
    width: 50%;
    height: 100%;
    background: white;
    overflow-y: auto;
    padding: 30px;
    border-right: 1px solid #e5e5e5;
}

.left_desc h3 {
    color: #333;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.left_desc pre {
    color: #555;
    font-size: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 右侧代码编辑器 */
.right_code {
    width: 50%;
    height: 100%;
    background: #272822;
}

.right_code .ace_editor {
    width: 100%;
    height: 100%;
}

/* 底部提交区域 */
.part2 {
    width: 100%;
    background: white;
    border-top: 1px solid #e5e5e5;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.part2 .result {
    flex: 1;
    max-width: 60%;
}

.part2 .result pre {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    padding: 5px 0;
}

.btn-submit {
    padding: 12px 30px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

/* 滚动条样式 */
.left_desc::-webkit-scrollbar {
    width: 8px;
}

.left_desc::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.left_desc::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.left_desc::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .part1 {
        flex-direction: column;
    }

    .left_desc,
    .right_code {
        width: 100%;
        height: 50%;
    }

    .left_desc {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .navbar .nav-left,
    .navbar .nav-right {
        width: 100%;
        justify-content: center;
    }

    .left_desc {
        padding: 20px;
    }

    .left_desc h3 {
        font-size: 20px;
    }

    .part2 {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .part2 .result {
        max-width: 100%;
    }

    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .left_desc {
        padding: 15px;
    }

    .left_desc h3 {
        font-size: 18px;
    }

    .left_desc pre {
        font-size: 14px;
    }

    .part2 {
        padding: 15px;
    }
}